import React, { Component } from 'react'
import QcEventEmitter from "../utils/qcevents.js"
import propTypes from "prop-types"
 class Son1 extends Component {
   //  static 表示是静态的 
   // any 是任意的
   static propTypes = {
      send:propTypes.any
   }
   // 如果没有传参就走组件自己定义的这个参数
   static defaultProps = {
     send :"1910b"
   }
    emitFn () {
        // emit 是往出发送值
        QcEventEmitter.emit("contextClick","赵志豪","1910b")
    }
  render() {
    console.log(this.props)
    return (
      <div>
          <button onClick={this.emitFn.bind(this)}>点击我给兄弟组件传参</button>
      </div>
    )
  }
}

export default Son1